package com.hjxr.quota.define.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hjxr.quota.define.domain.QuotaValue;
import com.hjxr.quota.util.PageUtil;

import java.util.List;
import java.util.Map;

/**
 * @author ma
 * @version v1.0
 * @date 2020/9/17
 **/
public interface QuotaValueService extends IService<QuotaValue> {
    /**
     * 插入指标值表
     *
     * @param quotaId 指标id
     * @return
     */
    Boolean insert(Integer quotaId, String measure);

    Boolean updateValue(QuotaValue quotaValue);

    /**
     * 根据数据别名表id，自动注入指标值
     *
     * @param tablenameAliasId 数据别名表id
     * @return Boolean
     */
    Boolean addQuotaValue(Integer tablenameAliasId) throws Exception;

    PageUtil selectList(Map<String, Object> params);

    String getReportJson(Map<String, String> param, List<Integer> dimensionIds,String type);

    String getBarChartsJson(Map<String, String> param, List<Integer> dimensionIds,String type,Integer limit);

    String getPieChartsJson(Map<String, String> param, List<Integer> dimensionIds,String type,Integer limit);

    String getScatterChartsJson(Map<String, String> param, List<Integer> dimensionIds,String type,Integer limit);
}
